package com.phospherus.flow.repository

import com.phospherus.common.repository.BaseRepository
import com.phospherus.flow.entity.*

/**
 * @author songjinlong
 * @version 1.0
 * @since 2018/1/4
 */
interface DocumentProcessFdConfirmRepository : BaseRepository<DocumentProcessFdConfirm, Long> {
    fun findByFormInstId(formInstId: Long): DocumentProcessFdConfirm
}

interface DocumentProcessFdNoticeRepository : BaseRepository<DocumentProcessFdNotice, Long> {
    fun findByFormInstId(formInstId: Long): DocumentProcessFdNotice
}

interface DocumentProcessFdnFcDffContactRepository : BaseRepository<DocumentProcessFdnFcDffContact, Long> {
    fun findByFormInstIdAndDpfdId(formInstId: Long, dpfdId: Long): List<DocumentProcessFdnFcDffContact>
}

interface DocumentprocessDeliDetailRepository : BaseRepository<DocumentprocessDeliDetail, Long> {
    fun findByFormInstIdAndDpfdId(formInstId: Long, dpfdId: Long): List<DocumentprocessDeliDetail>
}

interface DocumentprocessFdnLccDflContactRepository : BaseRepository<DocumentprocessFdnLccDflContact, Long> {
    fun findByFormInstIdAndDpfdId(formInstId: Long, dpfdId: Long): List<DocumentprocessFdnLccDflContact>
}

interface DocumentprocessCcCustomsDeclarationInvoiceRepository : BaseRepository<DocumentprocessCcCustomsDeclarationInvoice, Long> {
    fun findByFormInstId(formInstId: Long): DocumentprocessCcCustomsDeclarationInvoice
}

interface DocumentprocessCcCdiTableRepository : BaseRepository<DocumentprocessCcCdiTable, Long> {
    fun findByFormInstIdAndCdiId(formInstId: Long, cdiId: Long): List<DocumentprocessCcCdiTable>
}

interface DocumentprocessCcDeclarationFormRepository : BaseRepository<DocumentprocessCcDeclarationForm, Long> {
    fun findByFormInstId(formInstId: Long): DocumentprocessCcDeclarationForm
}

interface DocumentprocessCcDfTableRepository : BaseRepository<DocumentprocessCcDfTable, Long> {
    fun findByFormInstIdAndDfId(formInstId: Long, dfId: Long): List<DocumentprocessCcDfTable?>?
}

interface DocumentprocessCcCustomsDeclarationContractRepository : BaseRepository<DocumentprocessCcCustomsDeclarationContract, Long> {
    fun findByFormInstId(formInstId: Long): DocumentprocessCcCustomsDeclarationContract
}

interface DocumentprocessCcCustomsDeclarationBoxRepository : BaseRepository<DocumentprocessCcCustomsDeclarationBox, Long> {
    fun findByFormInstId(formInstId: Long): DocumentprocessCcCustomsDeclarationBox
}

interface DocumentprocessCcCdbTableRepository : BaseRepository<DocumentprocessCcCdbTable, Long> {
    fun findByFormInstIdAndCdbId(formInstId: Long, cdbId: Long): List<DocumentprocessCcCdbTable?>?
}

interface DocumentprocessCcDeclarationElementsRepository : BaseRepository<DocumentprocessCcDeclarationElements, Long> {
    fun findByFormInstId(formInstId: Long): DocumentprocessCcDeclarationElements
}

interface DocumentprocessCcDeDefRepository : BaseRepository<DocumentprocessCcDeDef, Long> {
    fun findByFormInstIdAndDeId(formInstId: Long, deId: Long): List<DocumentprocessCcDeDef?>?
}

interface DocumentprocessCcLetterOfDeliveryRepository : BaseRepository<DocumentprocessCcLetterOfDelivery, Long> {
    fun findByFormInstId(formInstId: Long): DocumentprocessCcLetterOfDelivery
}

interface DocumentprocessAskInvoiceRepository : BaseRepository<DocumentprocessAskInvoice, Long> {
    fun findByFormInstId(formInstId: Long): DocumentprocessAskInvoice
}

interface DocumentprocessAskiTableRepository : BaseRepository<DocumentprocessAskiTable, Long> {
    fun findByFormInstIdAndAskiId(formInstId: Long, askiId: Long): List<DocumentprocessAskiTable?>?
}

interface DocumentprocessCollectionDataRepository : BaseRepository<DocumentprocessCollectionData, Long> {
    fun findByFormInstId(formInstId: Long): DocumentprocessCollectionData
}

